cmake_minimum_required(VERSION 3.10.2)
include(GNUInstallDirs)

project("CMakeCxx")

if(${CMAKE_GENERATOR} STREQUAL "Ninja")
    add_compile_options(-fdiagnostics-color)
endif()

set(CMAKE_VERBOSE_MAKEFILE ON)

set(CMAKECXX_SRCS
    cmakecxx.cpp
)

set(CMAKECXX_EXPORT_INCLUDES
    cmakecxx.h
)


add_library(cmakecxx
    #SHARED
    STATIC
    ${CMAKECXX_SRCS}
)

#target_link_libraries(
#    cmakecxx
#    libc
#)

install(FILES ${CMAKECXX_EXPORT_INCLUDES}
    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)

install(TARGETS cmakecxx
    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
